package com.example.shoppingmall.base;
// 序列化

import java.io.Serializable;

/**
 *  {
 *      "cover_price":"159.00",
 *      "figure":"1477984921265.jpg",
 *      "name":"现货 XXXX",
 *      "product_id":"9356"
 *  }
 *
 *  商品对象
 * */
// 商品详情页面的数据传递和接收
public class GoodsBean implements Serializable {
    // 价格
    private String cover_price;
    // 图片
    private String figure;
    // 名称
    private String name;
    // 产品id
    private String product_id;
    // 购物数量
    private int number = 1;
    // 是否被选中
    private boolean isSelected = true;

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getCover_price() {
        return cover_price;
    }

    public void setCover_price(String cover_price) {
        this.cover_price = cover_price;
    }

    public String getFigure() {
        return figure;
    }

    public void setFigure(String figure) {
        this.figure = figure;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProduct_id() {
        return product_id;
    }

    public void setProduct_id(String product_id) {
        this.product_id = product_id;
    }

    @Override
    public String toString() {
        return "GoodsBean{" +
                "cover_price='" + cover_price + '\'' +
                ", figure='" + figure + '\'' +
                ", name='" + name + '\'' +
                ", product_id='" + product_id + '\'' +
                ", number=" + number +
                '}';
    }
}
